export default //定义记分牌
class ScorePanel{
    score=-1
    level=0
    scoreEle:HTMLElement
    levelEle:HTMLElement
    constructor(public maxLevel:number=10,public upScore:number=10){
    this.scoreEle=document.getElementById('score')
    this.levelEle=document.getElementById('level')
    }
    addscore(){
        this.scoreEle.innerHTML=`SCORE:${++this.score}`
        if(this.score%this.upScore===0){
        this.addlevel()
    }
    }
    addlevel(){
        if(this.level<this.maxLevel)
        this.levelEle.innerHTML=`LEVEL:${++this.level}`
    }
}
